<?php

$request = new Zend_Controller_Request_Http();

if ($request->getPost('fruit') != null) {
	out($request->getPost('fruit'));
}

$table = new Member_Model_DbTable_Begroup();
$groups = $table->fetchAll('deleted=0');
$options = array();
foreach($groups AS $group) {
	$options[$group->id] = $group->name;
}

/*
$options = array(
    'apple'     =>  'Apple',
    'orange'    =>  'Orange',
    'pear'      =>  'Pear',
    'banana'    =>  'Banana',
    'cherry'    =>  'Cherry',
    'kiwi'      =>  'Kiwi',
    'lemon'     =>  'Lemon',
    'lime'      =>  'Lime',
    'tangerine' =>  'Tangerine',
);
*/

$attribs = array('size' => 5,
     'style' => 'width:300px;'
);
$value = $request->getPost('fruit', array());

echo  '<form name="test" method="post" action="">';
echo $this->formMultiSelect('fruit', $value, $attribs, $options);
echo  '<input type="submit" name="send" value="Send" />';
echo  '</form>';


?>